In many programming languages, map is the name of a higher-order function that applies a given function to each element of a list, returning a list of results. It is often called ''apply-to-all'' when considered in functional form. ==Example== For example, if we define in Haskell a function square as follows:
Then calling map square () will return (), as map will go through the list and apply the function square to each element.